package com.itheima.练习.test1;

import java.io.IOException;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;


public class Server {
    public static void main(String[] args) throws IOException {

        ServerSocket ss=new ServerSocket(10000);


        Socket socket = ss.accept();
        InputStream is = socket.getInputStream();

        int b=0;
        while ((b=is.read())!=-1){
            System.out.println((char)b);
        }
        socket.close();
        ss.close();
    }
}
